<?php /** Template Name: Activity */ get_header(); ?>

<div id="main" class="activity">
    <div class="visualArea">
        <div class="container">
          <div class="header col-xs-12">
              <h1 class=""><a href="<?php bloginfo( 'home' ); ?>/activity">ACTIVITY<span>部落格 • 最新消息 • 活動消息</span></a></h1>
              <ul class="">
              	<?php wp_list_categories('title_li='); ?>
              </ul>
          </div><!-- container header END-->
              <div class="itemList col-xs-12 col-sm-7 col-md-8">
                  <?php if ( have_posts() ): while ( have_posts() ) : the_post(); ?>  
                      <div class="item col-xs-12">
                          <a href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
                              <div class="thumb col-sm-12 col-md-6"><?php the_post_thumbnail('16-9-medium'); ?></div>
                              <div class="desc col-sm-12 col-md-6">
                                  <h4><?php the_title(); ?></h4>
                                  <div class="date"><i class="icon-calendar"></i> <?php $u_time = get_the_time('U');echo date("Y.m.j",$u_time); ?></div>
                                  <div class="except"><?php the_excerpt();?></div>
                              </div>
                          </a>
                      </div><!-- item END-->
                  <?php endwhile; ?>
                  <?php endif;?>
              </div>
              <div class="sidebar col-xs-12 col-sm-5 col-md-4">
                  <div class="tagarea">
                      <h3>TAG<span>• 相關標籤</span></h3>
					  	<?php
						$tags = get_tags( array('name_like' => "a", 'order' => 'ASC') );
						foreach ( (array) $tags as $tag ) {
						echo '<li><a href="' . get_tag_link ($tag->term_id) . '" rel="tag">' . $tag->name . ' </a></li>';
						}
						?>
                  </div>
                  <!-- Tag Area END-->
                  <div class="papulararea">
                      <h3>PAPULAR<span>• 熱門文章</span></h3>
                      <ul>
                          <?php wpp_get_mostpopular( 'post_type="post"&thumbnail_width=122&thumbnail_height=72&post_html="<li>{thumb} {title} {summary}</li>&{rating}' ); ?>
                      </ul>
                  </div>
                  <!-- Papular Area END-->
              </div><!-- Sidebar Area END-->
        </div><!-- container END-->
    </div><!-- visualArea END-->
</div><!-- main END -->

<?php get_footer(); ?>
